<%-- 
    Document   : index
    Created on : Feb 21, 2010, 1:28:16 PM
    Author     : stanley.2007
--%>
<%@ page import="wargame.entity.*" %>
<%@ page import="wargame.dao.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@ include file="common.jsp" %>
<%            // Main Application Logic Comes Here

%>

<HTML>
    
    <c:set var="title" value="MIC Tycoon"/>
    <%@ include file="htmlheader.jsp" %>

    <body>
        <div id="resolution">

            <%@ include file="header.jsp" %>
            <%@ include file="menu.jsp" %>

            <div class="content">

                <div id="notification_container">
                    
                    <c:set var="prev_turn" value="-1"/>
                    <c:forEach items="${notification_list}" var="notification">
                        <div id="notification_holder">
                            <c:if test="${notification.turn != prev_turn}">
                                <b>Turn ${notification.turn}</b>
                                <c:set var="prev_turn" value="${notification.turn}"/>
                            </c:if>

                            <c:set var="div_id" value="notification_item"/>
                            <c:if test="${notification.turn == turn.current_turn}">
                                <c:set var="div_id" value="current_notification_item"/>
                            </c:if>

                            <div id="${div_id}">
                                <c:if test="${notification.unread == 1}">
                                    <div id="new_notification">NEW!</div>
                                </c:if>
                                ${notification.message}
                            </div>
                        </div>
                    </c:forEach>
                </div>


            </div>
        </div>

    </BODY>
</HTML>